home *** CD-ROM | disk | FTP | other *** search
/ Cream of the Crop 1 / Cream of the Crop 1.iso / PROGRAM / VIS082S.ARJ / CELCONV.PAS < prev    next >
Pascal/Delphi Source File  |  1991-03-25  |  4KB  |  140 lines

  1. Program Celerity_To_Vision_Convert;
  2.  
  3. { Written by: The Elemental }
  4. { There's no stop'n US! }
  5.  
  6. Uses Gentypes,Configrt,Crt;
  7.  
  8. Type CELConfType=(lowerc,eightyc,linef,postp,morep,asciig,ansig,udsys,bulletinsys,
  9.                   votingsys,emailsys,doorssys,mainsys,databasesys,NewUserSys,
  10.                   gfsys,want,showt,vt522,fsedit);
  11.      CELFListType=(ffname,ffext,fffulnam,ffofwhat,ffsize,ffpoints,ffuploader,
  12.                    ffuploaded,ffdown,ffdescript);
  13.      NuvSet = set of 1..255;
  14.  
  15.      CELURec = Record
  16.        Handle,RealName,Note:MStr;
  17.        Macro1,Macro2,Macro3:LStr;
  18.        Password:Sstr;
  19.        PhoneNum:String[12];
  20.        Laston:Longint;
  21.        Numon,TimeToday,Nup,Ndn,Nbu,Uploads,Downloads:Integer;
  22.        TotalTime:Real;
  23.        Voted:Array [1..5] of Byte;
  24.        UdLevel,UdPoints,Level,EmailAnnounce,BeepedPwd:Integer;
  25.        Infoforms:array [1..5] of Integer;
  26.        RegularColor,PromptColor,StatColor,InputColor,FifthColor,SixthColor,
  27.        SeventhColor,EighthColor,DisplayLen:Byte;
  28.        LastMessages,LastUps,LastGfiles,LastDBases,Integer1:Integer;
  29.        DownK,UpK:Longint;
  30.        GFLevel,GfUploads,GFDownloads:Integer;
  31.        MenuType,Byte1:Byte;
  32.        DefProto,Char1:Char;
  33.        Hack:Byte;
  34.        Config:Set of CELConfType;
  35.        NewScanConfig,Access1,Access2:Set of Byte;
  36.        TimeinStorage:Word;
  37.        LastRead:Array [0..20,1..5] of Word;
  38.        ConfAccess:Array [0..5] of Boolean;
  39.        LastCps,CpsTimes:Word;
  40.        FileList:Set of CELFListType;
  41.        CommPoints,ValPoints:Integer;
  42.        ScanNet:Boolean;
  43.        QuikConf:Array [1..5] of Boolean;
  44.        UserPcr,UserUdr,Age:Byte;
  45.        UserSex:Boolean;
  46.        VoteYes,VoteNo,TimePerDay:Byte;
  47.      End;
  48.  
  49. Procedure CelerityUserConvert;
  50. Var UFile:File of CELURec;
  51.     CEL:CELURec;
  52.     VFile:File of UserRec;
  53.     VIS:UserRec;
  54.     Cnt,I:Integer;
  55. Begin
  56.   Writeln ('Converting: Celerity User List to Vision Format!');
  57.   Assign (UFile,'USERS');       { Open And Rename Celerity Users File }
  58.   Reset (UFile);
  59.   If IOResult <> 0 Then Begin
  60.     Writeln ('File: USERS not found.. Cannot continue!');
  61.     Close (UFile);
  62.     Exit
  63.   End;
  64.   Rename (UFile,'USERS.CEL');
  65.   Assign (VFile,'USERS.');      { Open and Create Vision Users File }
  66.   Rewrite (VFile);
  67.   Seek (UFile,1);
  68.   Seek (VFile,0);
  69.   Cnt:=0;
  70.   TextAttr:=11;
  71.   While Not Eof(UFile) Do Begin
  72.     Read (UFile,CEL);
  73.     For I:=1 to Length(VIS.Handle) Do
  74.      Write (#8#32#8);
  75.     FillChar (VIS,SizeOf(VIS),0);
  76.     If Length(CEL.Handle) > 0 Then Begin
  77.       Cnt:=Cnt + 1;
  78.       Write (VIS.Handle);
  79.       VIS.Handle:=CEL.Handle;
  80.       VIS.RealName:=CEL.RealName;
  81.       VIS.UserNote:=CEL.Note;
  82.       VIS.Macro1:=CEL.Macro1;
  83.       VIS.Password:=CEL.Password;
  84.       VIS.PhoneNum:=Copy(CEL.PhoneNum,1,3) + Copy(CEL.PhoneNum,5,3) +
  85.                     Copy(CEL.PhoneNum,9,4);
  86.       VIS.Level:=CEL.Level;
  87.       VIS.Numon:=CEL.Numon;
  88.       VIS.NBu:=CEL.NBu;
  89.       VIS.UdLevel:=CEL.UdLevel;
  90.       VIS.UdPoints:=CEL.UdPoints;
  91.       VIS.Uploads:=CEL.Uploads;
  92.       VIS.Downloads:=CEL.Downloads;
  93.       VIS.RegularColor:=CEL.RegularColor;
  94.       VIS.StatColor:=CEL.StatColor;
  95.       VIS.InputColor:=CEL.InputColor;
  96.       VIS.PromptColor:=CEL.PromptColor;
  97.       VIS.MenuBoard:=CEL.FifthColor;
  98.       VIS.MenuBack:=CEL.SixthColor;
  99.       VIS.MenuHighLight:=CEL.SeventhColor;
  100.       VIS.DisplayLen:=CEL.DisplayLen;
  101.       VIS.BlowInside:=7;
  102.       VIS.BlowBoard:=7;
  103.       VIS.StatusBoxColor:=7;
  104.       VIS.Config:=[LowerCase,LineFeeds,AnsiGraphics,AsciiGraphics,Fseditor,
  105.                    EightyCols];
  106.       Seek (VFile,Cnt - 1);
  107.       Write (VFile,VIS);
  108.     End;
  109.   End;
  110.   Writeln (Cnt,' Users Converted over to Vision!');
  111.   If Cnt > 70 Then Writeln ('Ahh.. Busy Day!!');
  112.   Close (UFile);
  113.   Close (VFile);
  114. End;
  115.  
  116. Var K:Char;
  117. Begin
  118.   ReadConfig;
  119.   TextAttr:=7;
  120.   ClrScr;
  121.   TextAttr:=12;
  122.   Write (#13#10#13#10'Celerity to ');
  123.   TextAttr:=13;
  124.   Write ('ViSiON ');
  125.   TextAttr:=12;
  126.   Writeln ('User Converter!');
  127.   TextAttr:=9;
  128.   Writeln ('Written by: The Elemental - ViSiON Programming Staff Member');
  129.   TextAttr:=10;
  130.   Writeln ('(C)opyright 1991 Ruthless Enterprises!!');
  131.   Writeln;
  132.   Repeat
  133.    Write ('Continue with Conversion [y/N]? ');
  134.    K:=Upcase(ReadKey);
  135.   Until K in [#13,'Y','N'];
  136.   If K = 'Y' Then Begin
  137.     CelerityUserConvert;
  138.     Writeln ('Celerity Users List Saved as USERS.CEL');
  139.   End;
  140. End.